<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<div class="sidebarmenu" style="width: 100%;">
	<a style="background-size: 110% 100%; width: 100%;"
		class="menuitem submenuheader" href=""><spring:message
			code="top.newest"></spring:message></a>
	<div class="submenu">
		<ul>
			<c:forEach var="newestProduct" items="${newestProducts.result}">
				<li><a href="<c:url value="/product?id=${newestProduct.id}"/>">${newestProduct.id}
						- <strong>${newestProduct.name}</strong> - <spring:message
							code="producttype" />: ${newestProduct.type.name} - <spring:message
							code="madein" />: ${newestProduct.madeIn} - <spring:message
							code="producer" />: ${newestProduct.producer.name} - <spring:message
							code="viewed" />: ${newestProduct.views} - <strong class="price">
							<fmt:formatNumber type="number" value="${newestProduct.price}"
								groupingUsed="true" /> VNĐ
					</strong>
				</a></li>
			</c:forEach>
		</ul>
	</div>
	<a style="background-size: 110% 100%; width: 100%;"
		class="menuitem submenuheader" href=""><spring:message
			code="top.mostsold"></spring:message></a>
	<div class="submenu">
		<ul>
			<c:forEach var="mostSoldProduct" items="${mostSoldProducts.result}">
				<li><a
					href="<c:url value="/product?id=${mostSoldProduct.id}"/>">${mostSoldProduct.id}
						- <strong>${mostSoldProduct.name}</strong> - <spring:message
							code="producttype" />: ${mostSoldProduct.type.name} - <spring:message
							code="madein" />: ${mostSoldProduct.madeIn} - <spring:message
							code="producer" />: ${mostSoldProduct.producer.name} - <spring:message
							code="viewed" />: ${mostSoldProduct.views} - <strong
						class="price"> <fmt:formatNumber type="number"
								value="${mostSoldProduct.price}" groupingUsed="true" /> VNĐ
					</strong>
				</a></li>
			</c:forEach>
		</ul>
	</div>
</div>